<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
             xmlns:camunda="http://camunda.org/schema/1.0/bpmn"
             targetNamespace="Examples">

  <process id="process" isExecutable="true">

    <startEvent id="theStart">
      <extensionElements>
        <camunda:executionListener event="start" class="org.camunda.bpm.engine.test.standalone.entity.ExecutionOrderListener" />
      </extensionElements>
    </startEvent>

    <sequenceFlow sourceRef="theStart" targetRef="theService1" />

    <serviceTask id="theService1" camunda:expression="${true}">
      <extensionElements>
        <camunda:executionListener event="start" class="org.camunda.bpm.engine.test.standalone.entity.ExecutionOrderListener" />
      </extensionElements>
    </serviceTask>

    <sequenceFlow sourceRef="theService1" targetRef="subProcess" />

    <subProcess id="subProcess">
      <extensionElements>
        <camunda:executionListener event="start" class="org.camunda.bpm.engine.test.standalone.entity.ExecutionOrderListener" />
      </extensionElements>

      <startEvent id="innerStart">
        <extensionElements>
          <camunda:executionListener event="start" class="org.camunda.bpm.engine.test.standalone.entity.ExecutionOrderListener" />
        </extensionElements>
      </startEvent>

      <sequenceFlow sourceRef="innerStart" targetRef="innerService" />

      <serviceTask id="innerService" camunda:expression="${true}">
        <extensionElements>
          <camunda:executionListener event="start" class="org.camunda.bpm.engine.test.standalone.entity.ExecutionOrderListener" />
        </extensionElements>
      </serviceTask>

      <sequenceFlow sourceRef="innerService" targetRef="innerEnd" />

      <endEvent id="innerEnd">
        <extensionElements>
          <camunda:executionListener event="start" class="org.camunda.bpm.engine.test.standalone.entity.ExecutionOrderListener" />
        </extensionElements>
      </endEvent>

    </subProcess>

    <sequenceFlow sourceRef="subProcess" targetRef="theService2" />

    <serviceTask id="theService2" camunda:expression="${true}">
      <extensionElements>
        <camunda:executionListener event="start" class="org.camunda.bpm.engine.test.standalone.entity.ExecutionOrderListener" />
      </extensionElements>
    </serviceTask>

    <sequenceFlow sourceRef="theService2" targetRef="theEnd" />

    <endEvent id="theEnd">
      <extensionElements>
        <camunda:executionListener event="start" class="org.camunda.bpm.engine.test.standalone.entity.ExecutionOrderListener" />
      </extensionElements>
    </endEvent>

  </process>

</definitions>